package com.szqhyxj.youxiangju.biz.merchantHome.deviceinfo;

import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/12/18.
 */

public class DeviceModel {

    private interface deviceinfoService{
        @POST("deviceinfo/getdeviceinfo")
        Observable<BaseResult<DeviceInfoBean>> deviceinfo();
    }

    public static Observable<BaseResult<DeviceInfoBean>> getdeviceinfo() {
        return RetrofitFacade.Companion.getRetrofit()
                .create(deviceinfoService.class)
                .deviceinfo();
    }



    public static class DeviceInfoBean{

        @SerializedName("areaInfo")
        private String areaInfo;

        @SerializedName("aepnType")
        private String aepnType;

        @SerializedName("localVersion")
        private String localVersion;

        @SerializedName("updateDate")
        private String updateDate;

        @SerializedName("devNo")
        private String devNo;

        @SerializedName("battery")
        private String battery;

        @SerializedName("onlineState")
        private String onlineState;

        public void setAreaInfo(String areaInfo){
            this.areaInfo = areaInfo;
        }

        public String getAreaInfo(){
            return areaInfo;
        }

        public void setAepnType(String aepnType){
            this.aepnType = aepnType;
        }

        public String getAepnType(){
            return aepnType;
        }

        public void setLocalVersion(String localVersion){
            this.localVersion = localVersion;
        }

        public String getLocalVersion(){
            return localVersion;
        }

        public void setUpdateDate(String updateDate){
            this.updateDate = updateDate;
        }

        public String getUpdateDate(){
            return updateDate;
        }

        public void setDevNo(String devNo){
            this.devNo = devNo;
        }

        public String getDevNo(){
            return devNo;
        }

        public void setBattery(String battery){
            this.battery = battery;
        }

        public String getBattery(){
            return battery;
        }

        public void setOnlineState(String onlineState){
            this.onlineState = onlineState;
        }

        public String getOnlineState(){
            return onlineState;
        }

        @Override
         public String toString(){
            return
                "DeviceInfo{" +
                "areaInfo = '" + areaInfo + '\'' +
                ",aepnType = '" + aepnType + '\'' +
                ",localVersion = '" + localVersion + '\'' +
                ",updateDate = '" + updateDate + '\'' +
                ",devNo = '" + devNo + '\'' +
                ",battery = '" + battery + '\'' +
                ",onlineState = '" + onlineState + '\'' +
                "}";
            }
    }
}
